package fatworm.query.expression;

import fatworm.query.Plan;
import fatworm.query.Scan;
import fatworm.storage.table.Schema;

public class NotTerm implements Term {
	
	private Term term;
	
	public NotTerm(Term term) {
		this.term = term;
	}
	
	public boolean isOK(Scan s) {
		return !term.isOK(s);
	}
	
	public boolean isIn(Schema sch) {
		return term.isIn(sch);
	}
	
	public int reductionFactor(Plan p) {
		return term.reductionFactor(p);
	}
	
	public String toString() {
		return "NOT" + term.toString();
	}
}